home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / FREENET / MCEVOY / MAPREADE / !MapReader / !Help next >
Text File  |  1995-11-07  |  4KB  |  89 lines

  1. !MapReader v0.4
  2.  
  3.         ArcWeb ImageMap Decoder for local files
  4.         =======================================
  5.         
  6. Disclaimer!
  7. ===========
  8.  
  9.     I wrote this because I needed to, and I am making it available in case
  10. anyone else finds it useful.  I would rather not be responsible for any
  11. damage it does to my files or machine, and I certainly won't be held
  12. responsible for anyone else's.
  13.     Furthermore, this is distributed free - it's too 'orribly written for
  14. anyone to justify making any money at all.  Not that you'd try.
  15.     Please include this file in any copies - its not very long.
  16.     
  17. Hints on getting !MapReader to work
  18. ===================================
  19.  
  20.     This is not an instruction manual, and the program is not (yet?) well
  21. commented, but it must be fairly straight forward or I couldn't have written
  22. it!
  23.  
  24.     MapReader expects to be passed two System variables - ImageMap$X and
  25. ImageMap$Y, containing the X and Y coordinates from ArcWeb.  I have included
  26. a note of the changes to make to the !FilerURLs.!RunImage (distributed
  27. with ArcWeb 0.35 and © Acorn) at the bottom of this document, so that it
  28. generates these from a Filer_Run: URL method.
  29.  
  30.     MapReader works by using an index image to decode the coordinates. 
  31. The index is a 256 colour sprite called 'image' and saved as !MapReader.Image
  32. This is a copy of the source of the map, coloured to define the areas that
  33. are to act as anchors.  The index image MUST be scaled to the same size as
  34. the pixel dimensions of the rendered map - load it into ArcWeb as an ISMAP
  35. image and point to the bottom right-hand corner to find the dimensions. 
  36. However, I advise against scaling the image before colouring it, as so much
  37. definition can be lost as to make it rather difficult to see what one is
  38. doing.
  39.     Next, colour 'sensitive' areas of the index image, noting the number
  40. of the colour as displayed by the !Paint large colours chooser.  Each colour
  41. may be linked to a separate URL, and if anyone needs more than 254 links per
  42. document, they are in a different league from me!
  43.     Now, scale the sprite down so that it is within a pixel-or-two of the
  44. correct dimensions, and flip it upside-down.  It's not my fault that sprites'
  45. origins are bottom-left and ImageMaps' are top-left :-(  Finally save the image.
  46.  
  47.     Now generate a text index file.  This is picky on format because it's
  48. late and I'm lazy!  Each line must begin with two or three numbers
  49. (ie. 00, 04, 123) followed by a space, followed by a fully-qualified URL,
  50. followed by a return code.  The file should finish with a return code.  This
  51. should be saved as !MapReader.Index
  52.  
  53.     Now point the anchor of your ISMAP image to :-
  54.         filer_run://ADFS::HardDisc/$/foo/bar/!MapReader
  55.     or whatever, and enjoy!
  56.     
  57.     Compliments (??), comments (helpful!) and hints to :
  58.                 cwrm100@cus.cam.ac.uk
  59.                 
  60.                 
  61.                     Charles McEvoy
  62.                     Cambridge, Sat 23rd September 1995
  63.                     
  64. PS. It may be necessary to make adjustments to the WimpSlot, but the sprite
  65. area looks after itself now.
  66.                     
  67.                     
  68. Ammendments to make to Acorn's !FilerURLs.!RunImage
  69. ===================================================
  70.  
  71. *Insert* the following from line 230.  Don't go deleting things!
  72.  
  73.   230REM
  74.   240REM split off the ImageMap info if it is there
  75.   250REM
  76.   260i%=INSTR(url$,"?")
  77.   270IFi%<>0 mapcoord$=MID$(url$,i%+1):url$=LEFT$(url$,i%-1) ELSE mapcoord$=""
  78.   280IF mapcoord$<>"" THEN
  79.   281i%=INSTR(mapcoord$,",") : IF i%=0 ERROR 0, "Bad Coordinates"
  80.   282IF i%<>0 Xcoord$=LEFT$(mapcoord$,i%-1) : Ycoord$ = MID$(mapcoord$,i%+1)
  81.   290OSCLI "SETEVAL ImageMap$X " + Xcoord$
  82.   291OSCLI "SETEVAL ImageMap$Y " + Ycoord$
  83.   292ENDIF
  84.   
  85. That's all folks.
  86.             C.
  87.             
  88.             
  89. Many thanks to Stuart Brodie for ArcWeb, and to Dom Symes for Zap.